#!/usr/bin/env python
# coding=utf-8
import time
def print_time(f):
    """TODO: Docstring for print_time.

    :arg1: TODO
    :returns: TODO

    """
    def decorator( *args, **kwargs,):
        """TODO: Docstring for decorator.
        :returns: TODO

        """
        print(time.ctime())
        f( *args, **kwargs,)
        print(time.ctime())
    return decorator

@print_time
def function1(arg1):
    """TODO: Docstring for function.

    :arg1: TODO
    :returns: TODO

    """
    print(arg1)

def function2(arg1):
    """TODO: Docstring for function.

    :arg1: TODO
    :returns: TODO

    """
    print(arg1)

if __name__ == "__main__":
    # 语法糖表达式
    function1("do function work")
    # 正常闭包表达式
    f = print_time(function2)
    f("do function work2")
